package com.lbd.base.controller;

/**
 * Created by WangYajie on 2016/9/28.
 * <p>
 * 获取验证码
 *
 * @param length 验证码长度
 * @param key 标识
 * @param session session
 * @param response 响应
 * @throws IOException 输入输出异常
 * <p>
 * 获取验证码
 * @param length 验证码长度
 * @param key 标识
 * @param session session
 * @param response 响应
 * @throws IOException 输入输出异常
 */
/*

@RestController
@RequestMapping("/var")
public class ImgCodeController extends BaseController {
    */
/**
 *获取验证码
 * @param length 验证码长度
 * @param key 标识
 * @param session session
 * @param response 响应
 * @throws IOException 输入输出异常
 *//*

    @RequestMapping(value = "/imgCode", method = RequestMethod.GET)
    public void code(int length, String key, HttpSession session, HttpServletResponse response) throws IOException {
        CaptchaService cs = VerificationCode.writeImg(length);
        String code = EncoderHelper.getChallangeAndWriteImage(cs, "png", response.getOutputStream());
        session.setAttribute(key, code);
    }
}
*/
